Map array
points.assign(points.map(func(point : Vector2i) -> Vector2i:
return point + Vector2i(-1, 0)
))
-
Map:
-
Performs mapping and returns the mapping result.
-
Return is always of type
Array.
-
-
Assign:
-
Takes all elements from an array and puts them into itself, converting types.
-
In this case, converts the return of
maptoArray[Vector2i], sincepoints : Array[Vector2i].
-
-
Assign seems to clear the current array, but it's strange.
-